package a_airwar;

public class Bigplane extends FlyObj implements Enemy,Award  {

    private int speed;
    private int score;
    private int awardType=(int)(Math.random()*2);
    /* public Bigplane() {
         image = JFrameMain.bigplane;
         width = image.getWidth();
         height = image.getHeight();
         x = (int) (Math.random() * JFrameMain.Width);
         y = -image.getHeight();
         speed = 5;
         blood = 3;

     }*/
    public Bigplane() {
        //使用private修饰之后 所有的成员变量都访问不到
        //只能使用super关键词调用 - 调用父类的构造方法
        super((int) (Math.random() * 400),
                -JFrameMain.bigplane.getHeight(),
                JFrameMain.bigplane,
                5);
        speed = 5;
        score = 5;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    @Override
    public void move() {
        this.setY(this.getY() + speed);
        // y += speed;
    }


    @Override
    public int getType() {
        return awardType;
    }
}
